package org.lynn.lambda.test;

import org.junit.Test;
import org.lynn.lambda.stream.MyStream;

import java.util.ArrayList;
import java.util.List;

/**
 * @author linzou@linkdoc.com
 * @ClassName: CustomFunctionalInterface
 * @Description:
 * @date 2019/6/27 11:06 AM
 */
public class CustomFunctionalInterface {

    @Test
    public void functionInterface() {

        List<String> data = new ArrayList<>();

        data.add("I");
        data.add("love");
        data.add("you");
        data.add("too");


        MyStream<String> stream = new MyStream<>();
        stream.setList(data);

        stream.foreachMyData(str -> System.out.println(str));


    }
}
